#pragma once
#include "stdafx.h"
#include "TableSource.h"
#include "QueryOutput.h"
class Server
{
public:
	Server(void);
	virtual ~Server(void);
	
	/**
	 * Begin the specification of an application.  The actual
	 * specification is done using 
	 *
	 * @return           0 (success), !0 (failure)
	 */
	virtual int beginAppSpecification() = 0;
	/**
	 * End the specification of an application.  At this point the server
	 * can allocate resources (read create operators, queues etc) for the
	 * execution of the query.  
	 * 
	 * @return            0 (success), !0 (otherwise)
	 */	
	virtual int endAppSpecification() = 0;
	/**
	 * Start the execution of the query: start reading the tuples from all
	 * the table sources and produce the output tuples.  In true spirit of
	 * continuous queries - this never returns :)
	 */
	virtual int beginExecution() = 0;


	virtual int registerSchema() = 0;

	virtual int registerQuery() = 0;

	//virtual int getQuerySchema (unsigned int queryId,
	//	char *schemaBuf,
	//	unsigned int schemaBufLen) = 0;	

	//virtual int registerView(unsigned int queryId,
	//	const char *tableInfo,
	//	unsigned int tableInfoLen) = 0;
	
	
};

